package com.example.web.demos.feign;


import com.example.web.demos.domain.dto.Student;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.util.MultiValueMap;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@Service
@FeignClient(
        url = "http://localhost:8081/hello",
        name = "CDApiFeignClient",
        contextId = "CDApiFeignClient"
)
public interface CDApiClient {

    @PostMapping("/test1")
    String test1(@RequestBody Student student);


    @PostMapping("/test2")
    String test2(@RequestParam String name);

    @PostMapping("/test3")
    String test3(Student student);


    @PostMapping("/test4")
    String test4(String name);

    @PostMapping("/test5")
    String test5(Map<String,String> map);

    @PostMapping("/test6")
    String test6(MultiValueMap<String, String> map);



}
